

void UI_SnapDistOptions::destroy() {
    PF_SETTINGS->beginGroup("/Snap");
    PF_SETTINGS->writeEntry("/Distance", leDist->text());
    PF_SETTINGS->endGroup();
}

void UI_SnapDistOptions::setDist(double* d) {
    dist = d;

    PF_SETTINGS->beginGroup("/Snap");
    QString r = PF_SETTINGS->readEntry("/Distance", "1.0");
    PF_SETTINGS->endGroup();

    leDist->setText(r);
}

void UI_SnapDistOptions::updateDist(const QString& d) {
    if (dist!=NULL) {
        *dist = PF_Math::eval(d, 1.0);
    }
}
